/*
 * ChatMessage.h
 *
 */

#ifndef CHATMESSAGE_H_
#define CHATMESSAGE_H_

#include "ariba/ariba.h"

using_serialization;

/**
  * \brief The message object used by our chat application
  *
  * In SpoVNet, you can define your own objects as messages to be sent and received.\n
  * When sent, they are serialized and transmitted, and de-serialized on the receiver size.
  *
  * Please refer to the ariba documentation on how to enable automatic serialization,\n
  * or copy\&paste this header file and its implementation and change it appropriately.
  *
  **/
class ChatMessage  : public ariba::Message
{
	VSERIALIZEABLE;
public:
	/// Default constructor, required for automatic de-serialization
	ChatMessage();

	/// Convenient constructor for setting up a new chat message object
	ChatMessage(string chatText);

	/// Copy constructor
	ChatMessage(ChatMessage &other);

	/// Default destructor
	virtual ~ChatMessage();

	string chatText;
};

sznBeginDefault(ChatMessage, X)
{
    X && T(chatText);
} sznEnd();

#endif /* CHATMESSAGE_H_ */
